Csv plugin example

Kanzi uses gettext's .po file format for handling localized text resources. See The Format of PO Files. To use a different format for importing and exporting localized text resources, you can use the Kanzi Localization Plugin API to create a Kanzi Studio plugin that supports the format based on your specifications. You can find an example of such plugin in the <KanziWorkspace>/Examples/CsvPlugin directory.

When you import localized content with the CSV plugin:

The Localization Plugin API is written in .NET 4.0 and the CsvPlugin example plugin is written in C#. See Localization plugin API reference.

The CsvPlugin example directory contains:

Importing and exporting localized text resources using a custom file format

To import and export localized text resources using a custom file format:

  1. Create a plugin using the Kanzi Localization Plugin API. You can find the reference documentation for the Kanzi Localization Plugin API in the <KanziWorkspace>/Examples/CsvPlugin/docs directory.
    For an example plugin that enables you to import and export localized text resources in .csv file format, open the <KanziWorkspace>/Examples/CsvPlugin/CsvPlugin.sln example in Visual Studio.
  2. When you are done writing your plugin, create the plugin .dll, and copy the plugin .dll to the %ProgramData%/Rightware/<KanziVersion>/plugins directory on your computer. If the plugins directory does not already exist there, create it.
    For example, if you are using the example CsvPlugin.sln solution, when you are done writing the plugin:OrThe CsvPlugin.sln solution is configured to create the plugin .dll in <KanziWorkspace>/Examples/CsvPlugin/bin.
  3. Open Kanzi Studio and open an existing or create a new project. If you already have Kanzi Studio opened, restart it to load your plugin the first time.
  4. If Kanzi Studio successfully loads your plugin, in the Library right-click any localization table and in the context menu select the commands you added with the plugin.
    For example, if you use the CsvPlugin example plugin .dll, the plugin adds context menu commands Export CSV and Import CSV.
  5. When you make changes to your plugin, after creating the .dll and copying the plugin .dll to the %ProgramData%/Rightware/<KanziVersion>/plugins directory, restart Kanzi Studio to take the newer version of the plugin into use.

See also

Localization plugin API reference

Localization

Kanzi Studio plugins

Examples